﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserPowerManage.aspx.cs"
    Inherits="WebSystem.User.UserPowerManage" Theme="Normal" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理员权限管理</title>

    <script language="javascript" type="text/javascript">
            function SelectAllCheckboxes(spanChk)
	        {
		        // Added as ASPX uses SPAN for checkbox
		        var xState=spanChk.checked;

		        elm = spanChk.form.elements;
		        for(i = 0; i < elm.length; i++)
		        {
			        if(elm[i].type == "checkbox" && elm[i].id != spanChk.id)
			        {
				        //elm[i].click();
				        if(elm[i].checked!=xState)
					        elm[i].click();	//elm[i].checked=xState;
			        }
		        }
	        }
    </script>

</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server">
       <%-- <div class="normalnav">
            <div class="normalcontent">
                控制面板>>>管理员权限管理</div>
        </div>--%>
        <div class="normalnav">
            <div class="normalcontent">
                <span style="color: #ffffff">控制面板>>></span><span style="color: #f6ff00">管理员角色管理</span>
            </div>
        </div>
        <div class="normalmenu">
            <div class="normalmenucontent" style="padding-left:250px;">
                权限分类:<asp:DropDownList ID="ddlPowerClass" CausesValidation="false" runat="server"
                    AutoPostBack="true" OnSelectedIndexChanged="ddlPowerClass_SelectedIndexChanged">
                </asp:DropDownList>
                权限名称:&nbsp;<asp:TextBox ID="txtPropasal" runat="server" Font-Size="14px" Width="123px" MaxLength="20"></asp:TextBox>
                <asp:ImageButton ID="ibtnsearch" runat="server" ImageUrl="../Images/Basic/chaxun.gif"
                    OnClick="butlookout_Click" />
                &nbsp; &nbsp;<font style="color: #426F98; font-family: 宋体; font-size: 12px">注：为空则查询所有</font>
            </div>
        </div>
        <div class="normalgrid">
            <%--列表主题--%>
            <asp:GridView ID="gvitem" runat="server" OnRowCommand="gvitem_RowCommand"
                SkinID="Normal" OnPageIndexChanging="gvitem_PageIndexChanging" OnRowCreated="gvitem_RowCreated"
                EmptyDataText="暂无" OnRowDataBound="gvitem_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="序号" Visible="False" HeaderStyle-Width="40px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblID" Text='<%# DataBinder.Eval(Container.DataItem,"UP_PowerID") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="选择" HeaderStyle-Width="40px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="false" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="权限名称" HeaderStyle-Width="220px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <a title='<%#DataBinder.Eval(Container.DataItem, "UP_PowerName") %>的详细信息' href='UserPowerEdit.aspx?UserPowerID=<%# DataBinder.Eval(Container.DataItem,"UP_PowerID") %>'>
                                <%# Cisoft.IntegrationSystem.Common.Function.cutString(DataBinder.Eval(Container.DataItem, "UP_PowerName").ToString(), 18)%>
                            </a>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" Width="220px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="权限所属菜单分类" HeaderStyle-Width="150px" HeaderStyle-Height="35px">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LblFolder" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="150px" />
                    </asp:TemplateField>
                </Columns>
                <PagerSettings Visible="False" />
            </asp:GridView>
        </div>
        <div style="position: absolute; top: 45px; left: 55px;">
            <asp:CheckBox ID="ChkAll" runat="server" Text="全选" onclick="javascript:SelectAllCheckboxes(this)"
                Font-Size="14px" />
            <asp:ImageButton ID="ibtnshenpi" runat="server" ImageUrl="../Images/Basic/tianjia.gif"
                CausesValidation="False" OnClick="ibtnshenpi_Click" ToolTip="新增" />&nbsp;新增
            <asp:ImageButton ID="butDelete" runat="server" ImageUrl="../Images/Basic/shanchu.gif"
                OnClick="butDelete_Click" CausesValidation="False" ToolTip="删除"/>&nbsp;删除
        </div>
        <div class="normalpager">
            <asp:Label ID="lblNumbers" runat="server"></asp:Label>&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" OnClick="PagerButtonClick" runat="server" CommandArgument="0"
                CausesValidation="False">最首页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnPrev" OnClick="PagerButtonClick" runat="server" CommandArgument="prev"
                CausesValidation="False">前一页</asp:LinkButton>&nbsp;
            <asp:Label ID="lblCurrentIndex" runat="server"></asp:Label>&nbsp;/&nbsp;
            <asp:Label ID="lblPageCount" runat="server"></asp:Label>
            <asp:LinkButton ID="btnNext" OnClick="PagerButtonClick" runat="server" CommandArgument="next"
                CausesValidation="False">后一页</asp:LinkButton>&nbsp;
            <asp:LinkButton ID="btnLast" OnClick="PagerButtonClick" runat="server" CommandArgument="last"
                CausesValidation="False">最后页</asp:LinkButton>
        </div>
    </form>
</body>
</html>
